<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org"
      th:replace="~{admin/layout :: html(title=${title}, content=~{::content})}">
<head>
    <title>企业信息管理</title>
</head>
<body>
<div th:fragment="content">
    <div th:if="${message}" class="alert alert-success" th:text="${message}"></div>

    <form th:action="@{/admin/company/save}" th:object="${company}" method="post">
        <!-- 公司信息通常只有一条记录，ID设为1 -->
        <input type="hidden" th:field="*{id}" th:value="1"/>

        <div class="mb-3">
            <label for="name" class="form-label">公司名称</label>
            <input type="text" class="form-control" id="name" th:field="*{name}" required>
        </div>

        <div class="mb-3">
            <label for="about" class="form-label">关于我们 (支持HTML)</label>
            <textarea class="form-control" id="about" th:field="*{about}" rows="10"></textarea>
        </div>

        <div class="mb-3">
            <label for="address" class="form-label">地址</label>
            <input type="text" class="form-control" id="address" th:field="*{address}">
        </div>

        <div class="mb-3">
            <label for="phone" class="form-label">电话</label>
            <input type="text" class="form-control" id="phone" th:field="*{phone}">
        </div>

        <div class="mb-3">
            <label for="email" class="form-label">邮箱</label>
            <input type="email" class="form-control" id="email" th:field="*{email}">
        </div>
        
        <div class="mb-3">
            <label for="contactInfo" class="form-label">联系页面信息 (支持HTML)</label>
            <textarea class="form-control" id="contactInfo" th:field="*{contactInfo}" rows="8"></textarea>
        </div>

        <button type="submit" class="btn btn-primary"><i class="fas fa-save"></i> 保存</button>
    </form>
</div>
</body>
</html> 